package com.lzcangqiong.design.patterns.factory.simple;

/**
 * 葡萄
 * Created by luozhen on 2018/6/13.
 */
public class Grape implements Fruit{

    /**
     * 是否无籽的
     */
    private boolean seedless;

    @Override
    public void grow() {
        log("Grape is growing...");
    }

    @Override
    public void harvest() {
        log("Grape has bean harvested.");
    }

    @Override
    public void plant() {
        log("Grape has bean planted.");
    }

    private void log(String msg) {
        System.out.println(msg);
    }

    /**
     * 获取是否无籽
     * @return 是否无籽
     */
    public boolean isSeedless() {
        return seedless;
    }

    /**
     * 设置是否无籽
     * @param seedless 是否无籽
     */
    public void setSeedless(boolean seedless) {
        this.seedless = seedless;
    }
}
